from conftest import login_token4
import pytest,requests


class Test_science:
    # 查询用户帖子
    def test_science_01(self,login_token4):
        userId,sessionId=login_token4
        url='https://10.59.9.18/techApi/community/verify/v1/findUserPostById'
        headers={
            'userId':str(userId),
            'sessionId':str(sessionId)
        }
        data={
            'fromUid':10,
            'page':1,
            'count':1
        }
        r=requests.get(url=url,headers=headers,params=data,verify=False)
        r_json=r.json()
        print(r_json)
    #删除帖子
    def test_science_02(self,login_token4):
        userId,sessionId=login_token4
        url='https://10.59.9.18/techApi/community/verify/v1/deletePost'
        headers={
            'userId':str(userId),
            'sessionId':str(sessionId)
        }
        data={
            'communityId':368
        }
        r=requests.delete(url=url,headers=headers,params=data,verify=False)
        r_json=r.json()
        print(r_json)